import importlib


def get_learner(learner_name, args, data_manager):
    try:
        module = importlib.import_module(f"learners.{learner_name}")
        Learner = getattr(module, "Learner")
    except ModuleNotFoundError:
        raise ValueError(f"Unsupported learner name: {learner_name}")
    except AttributeError:
        raise ValueError(f"Learner class not found in module: learners.{learner_name}")

    return Learner(args, data_manager)
